home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
ANC_UTULITYS_16.adf
/
arclist
/
asm1.arc
/
CREAT.PIC.S
< prev
next >
Wrap
Text File
|
1988-09-21
|
2KB
|
73 lines
**********************************************************************
** HOW TO SHOW A PICTURE IN ASSEMBLER **
**********************************************************************
s:
move.l #coplist,$dff080 ; Pointer to copperlist
****************** FILL PICTURE WITH LINES *****************
move.l #$60000,a0 ; Picture is here
move.l #$1f40,d0 ; Number of bytes large
ClearLoop:
move.b #$ac,(a0)+ ; Store $ac in memory and
; add 1 to a0.
dbf d0,ClearLoop ; Subtract 1 from D0, if not
; -1 then jump to 'ClearLoop'
WaitMouse:
btst #6,$bfe001
bne.s WaitMouse ; Wait for mouse button
move.l 4,a6 ; AbsExecBase
move.l #0,d0 ; Take any version of graphlib
move.l #GraphLib,a1 ;Pointer to "graphics.library"
jsr -552(a6) ; OpenLibrary
move.l d0,a0 ; Start address of library
move.l $26(a0),$dff080 ; WB Screen copper pointer is
; in Start address+$26.
move.l #0,d0 ; Tells CLI we are OK.
rts
GraphLib:dc "graphics.library",0 ; Tell computer what library
; we want to open.
even ; Copperlist must be at an
; EVEN address
CopList: ; Copper list starts here
dc.w $0180,$0000 ; $0180=0 (Background color)
dc.w $0182,$0fff ; $0182=$fff (Color 1)
dc.w $0100,$1200 ; $0100=$1200, Use 1 Bitplane
; LOW-RES.
dc.w $00e0,$0006
dc.w $00e2,$0000 ; First BitPlane is at $60000
dc.w $008e,$2c81 ; Upper left corner of display
; Upper Edge ^^ ^^ Left edge ($81)
dc.w $0090,$f4c1 ;Lower right corner of display
; Lower edge ^^ ^^ Right edge ($c1)
dc.w $0092,$0038 ; Should be this way
dc.w $0094,$00d0 ; if 320x200 display.
dc.w $0108,$0000 ; Skip 0 bytes after
; a picture line has been
; drawn.
dc.w $0102,$0000 ; No shift (scroll)
dc.w $0120,$0000,$0122,$0000 ; Turn off sprite 0
dc.w $0124,$0000,$0126,$0000 ; Turn off sprite 0
dc.w $0128,$0000,$012a,$0000 ; Turn off sprite 0
dc.w $012c,$0000,$012e,$0000 ; Turn off sprite 0
dc.w $0130,$0000,$0132,$0000 ; Turn off sprite 0
dc.w $0134,$0000,$0136,$0000 ; Turn off sprite 0
dc.w $0138,$0000,$013a,$0000 ; Turn off sprite 0
dc.w $013c,$0000,$013e,$0000 ; Turn off sprite 0
dc.w $ffff,$fffe ; End of copperlist